/// 公司模型
class Company {
  final int companyId;
  final String companyCode;
  final String? companyName;
  final String? companyNameCn;
  final String? industry;
  final String? country;
  final String? stockExchange;
  final String? website;
  final String? description;
  final String? status;
  final String? createTime;
  final String? updateTime;
  String? logoUrl;

  Company({
    required this.companyId,
    required this.companyCode,
    this.companyName,
    this.companyNameCn,
    this.industry,
    this.country,
    this.stockExchange,
    this.website,
    this.description,
    this.status,
    this.createTime,
    this.updateTime,
    this.logoUrl,
  });

  factory Company.fromJson(Map<String, dynamic> json) {
    return Company(
      companyId: json['companyId'],
      companyCode: json['companyCode'] ?? '',
      companyName: json['companyName'],
      companyNameCn: json['companyNameCn'],
      industry: json['industry'],
      country: json['country'],
      stockExchange: json['stockExchange'],
      website: json['website'],
      description: json['description'],
      status: json['status'],
      createTime: json['createTime'],
      updateTime: json['updateTime'],
      logoUrl: json['logoUrl'],
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'companyId': companyId,
      'companyCode': companyCode,
      'companyName': companyName,
      'companyNameCn': companyNameCn,
      'industry': industry,
      'country': country,
      'stockExchange': stockExchange,
      'website': website,
      'description': description,
      'status': status,
      'createTime': createTime,
      'updateTime': updateTime,
      'logoUrl': logoUrl,
    };
  }
}

